#ifndef WEBINSPECTORDOCKWIDGET_H
#define WEBINSPECTORDOCKWIDGET_H

#include <QWebInspector>
#include <QDockWidget>
#include <QPointer>
#include <QHash>

class WebInspector : public QWebInspector
{
public:
    explicit WebInspector(QWidget* parent) : QWebInspector(parent) { }

private:
    void hideEvent(QHideEvent*) {
        // Prevent re-initializing QWebInspector after changing tab / virtual desktop
    }
};

class QupZilla;
class WebInspectorDockWidget : public QDockWidget
{
    Q_OBJECT
public:
    explicit WebInspectorDockWidget(QMainWindow* mainClass);
    ~WebInspectorDockWidget();

    void toggleVisibility();

signals:

public slots:
    void tabChanged();

    void close();
    void show();

private:
    QMainWindow* p_QupZilla;
    QHash<QWebPage*, QPointer<WebInspector> > m_inspectors;

    QPointer<WebInspector> m_currentInspector;
};

#endif // WEBINSPECTORDOCKWIDGET_H
